
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta id="viewport" name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=1,user-scalable=no">
    <c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>

    <title>Title</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="row">
    <div class="col-sm-6 col-md-4">
        <div class="thumbnail">
            <img src=${imageUrl} alt="...">
            <div class="caption">
                <h3>${title}</h3>
                <p>${comment}</p>
                <button type="button" class="btn btn-default btn-lg">
                    <span><img id="star" src="${path}/images/star0.png" width="30" height="30"></span>
                </button>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function(){
        var selected = false
        $('#star').click(function(){
            alert(selected)
            if(!selected){
             $(this).attr("src","${path}/images/star1.png")
                selected = true
                $.ajax()
            } else {
                $(this).attr("src","${path}/images/star0.png")
                selected = false
            }
        })

    })
</script>
</body>
</html>
